<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
%>
<html>
<head>
  <title>$Title$</title>
  <script type="application/javascript" src="./js/jquery-3.4.1.min.js"></script>
  <script>
    $(function () {
      $("button").click(function (){
        var obj = {
          "id":1,
          "name":"李四",
          "age":14
        }
        $.ajax({
          url:"/getUserJson",
          data:JSON.stringify(obj),
          contentType:"application/json;charset=UTF-8",
          type:"post",
          dataType:"json",
          success:function (res) {
            console.log(res);
          }
        })
      })
    })
  </script>
</head>
<body>
<a href="index">index</a>
<a href="index1">index</a>
<a href="index2">index</a>
<a href="index3">index</a>
<button>按钮</button>

<form action="/uploads" method="post" enctype="multipart/form-data">
  <input type="text" id="pName" name="pName" value="">
  <input type="file" id="pPath" name="pPath" value="">
  <button>提交</button>
</form>
</body>
</html>
